import request from '@/utils/request'

// 查询抖音类目列表
export function listCategory(query) {
  return request({
    url: '/system/category/list',
    method: 'get',
    params: query
  })
}

// 查询抖音类目详细
export function getCategory(id) {
  return request({
    url: '/system/category/' + id,
    method: 'get'
  })
}

// 新增抖音类目
export function addCategory(data) {
  return request({
    url: '/system/category',
    method: 'post',
    data: data
  })
}

// 修改抖音类目
export function updateCategory(data) {
  return request({
    url: '/system/category',
    method: 'put',
    data: data
  })
}

// 删除抖音类目
export function delCategory(id) {
  return request({
    url: '/system/category/' + id,
    method: 'delete'
  })
}

// 查询菜单下拉树结构
export function treeselect() {
  return request({
    url: '/system/category/treeselect',
    method: 'get'
  })
}


// 删除抖音商品
export function syncDyCategory() {
  return request({
    url: '/system/category/dataSync',
    method: 'post'
  })
}


